/*
 * @Description:
 * @FilePath: \rs_wms_pc\src\api\invoice\pickingOrder.js
 */
import request from '@/utils/request'

// 查询领料单列表
export function getList(query) {
  return request({
    url: '/bill/pick/list',
    method: 'get',
    params: query
  })
}

// 查询领料单详细
export function getDetail(id) {
  return request({
    url: '/bill/pick/' + id,
    method: 'get'
  })
}

// 新增领料单
export function add(data) {
  return request({
    url: '/bill/pick',
    method: 'post',
    data: data
  })
}

// 修改领料单
export function update(data) {
  return request({
    url: '/bill/pick',
    method: 'put',
    data: data
  })
}
// 修改领料单状态
export function shipments(data) {
  return request({
    url: '/bill/pick/shipments',
    method: 'put',
    data: data
  })
}

// 删除领料单
export function del(id) {
  return request({
    url: '/bill/pick/' + id,
    method: 'delete'
  })
}
// 订单完成
export function complete(data) {
  return request({
    url: '/bill/pick/complete',
    method: 'put',
    data: data
  })
}
// 订单确认
export function confirm(data) {
  return request({
    url: '/bill/pick/confirm',
    method: 'put',
    data: data
  })
}
// 订单取消
export function cancel(data) {
  return request({
    url: '/bill/pick/cancel',
    method: 'put',
    data: data
  })
}
// 订单取消
export function confirmCancel(data) {
  return request({
    url: '/bill/pick/confirmCancel',
    method: 'put',
    data: data
  })
}


// 查询销售订单明细列表
export function listDetail(query) {
    return request({
      url: '/bill/pickDetail/list',
      method: 'get',
      params: query
    })
  }

  // 查询销售订单明细详细
  export function getDetails(id) {
    return request({
      url: '/bill/pickDetail/' + id,
      method: 'get'
    })
  }

  // 新增销售订单明细
  export function addDetail(data) {
    return request({
      url: '/bill/pickDetail',
      method: 'post',
      data: data
    })
  }

  // 修改销售订单明细
  export function updateDetail(data) {
    return request({
      url: '/bill/pickDetail',
      method: 'put',
      data: data
    })
  }

  // 删除销售订单明细
  export function delDetail(id) {
    return request({
      url: '/bill/pickDetail/' + id,
      method: 'delete'
    })
  }
